﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Net;
using System.Net.Sockets;
using Sector7.Restaurant.APs.ServiceBus.Utility;
using Sector7.Framework.Core;
using Sector7.Framework.Enums;
using Sector7.Framework.Utility;

namespace ServiceBus
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Sector7 Restaurant ServiceBus [Version: 1.0.1101.00]");
            Console.WriteLine("Copyright (c) 2011-2012 Sector7 Software Studio. All rights reserved.");
            Console.WriteLine();

            Logger.WriteLine(LogSeverityType.INF, "ServiceBus starting...");

            // 校验IP是否改变
            //new LocalBusIPValidator().ValidateIsChanged();
            //Logger.WriteLine(LogType.INF, "Validate local bus ip is change completed.");

            // 启动所有服务
            WcfHostUtil.OpenAllServices();

            Logger.WriteLine(LogSeverityType.INF, "ServiceBus started.");

            // 接收命令
            while (true)
            {
                CommandLineUtil.Process(Console.ReadLine());
            }
        }
    }
}
